package com.example.enums;

/**
 * @author ：chengyoubang
 * @version ：V1.0
 * @program ：first-service
 * @date ：Created in 2023/12/24 16:24
 * @description ：
 */
public enum OccupationalRequirementEnum {
    PERSON_OK("是个人就可以",1,0.95),
    A_LITTLE_REQUIRE("有一定的要求",2,1.0),
    HARDER("有较强的要求",3,1.05),
    HARDEST("公务员",4,1.1)
    ;
    private String name;
    private Integer type;
    private Double ratio;

    OccupationalRequirementEnum(String name, Integer type, Double ratio) {
        this.name = name;
        this.type = type;
        this.ratio = ratio;
    }

    public static Double getRatio(Integer type){
        for(OccupationalRequirementEnum rest:OccupationalRequirementEnum.values()){
            if(rest.type.equals(type))
                return rest.ratio;
        }
        return null;
    }
}

